local chuancheng = fk.CreateSkill {
  name = "cf_chuancheng",
}

Fk:loadTranslationTable {
  ["cf_chuancheng"] = "传承",
  [":cf_chuancheng"] = "每回合限两次，当你受到伤害后，你获得伤害个数个【风引】标记。",
  ["$cf_chuancheng1"] = "传说，传说，那天也刮着罕见的大风。",
  ["$cf_chuancheng2"] = "风，回应我吧。",
}

chuancheng:addEffect(fk.Damaged, {
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(chuancheng.name) and player == data.to and player:usedSkillTimes(chuancheng.name) < 2 and
        player == data.to
  end,
  on_cost = function(self, event, target, player, data)
    local room = player.room
    return room:askToSkillInvoke(player, { skill_name = chuancheng.name })
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:addPlayerMark(player, "@cf_fengyin", data.damage)
  end
})

return chuancheng
